home *** CD-ROM | disk | FTP | other *** search
- /*
- * The original copyright owners of the accompanying source code files have
- * agreed to place such code into the public domain. Accordingly, anyone
- * who receives or obtains a copy of such source code is freely entitled to
- * reproduce, use and otherwise exploit such code (including the right to
- * make derivative works), at his/her own risk and expense, without any
- * obligation or liability to the original copyright owners.
- *
- * We would appreciate (but do not require) that the following message be
- * included in any derivative works:
- *
- * "Portions of this program were developed by Peter Broadwell, Rob Myers
- * and Robin Schaufler while working in Silicon Valley."
- *
- * The accompanying source code files and related documentation materials
- * are distributed on an "AS IS" basis, without any warranties or
- * guarantees of any kind. All implied warranties, including the implied
- * warranties of merchantability and of fitness for any particular purpose,
- * are expressly disclaimed.
- */
- #include <math.h>
- #include "gl.h"
- #include "device.h"
- #include "geom.h"
- #include "class.h"
- #include "classIds.h"
- #include "selectors.h"
- #include "mbox.h"
- #include "individual.h"
- #include "behavior.h"
- #include "doers.h"
- #include "colors.h"
-
- extern individual *us;
- extern behavior expanderTemplate;
-
- subscr *findvars();
-
- #define PI 3.14159265358979323844
- #define DEG(x) ((float)x*(float)180/PI)
- #define RAD(x) ((float)x*PI/(float)180)
-
- /*
- * initialize an egg's drawing (swiped from bubbleinit)
- */
- egginit(s)
- register individual *s;
- {
- register model *myModel;
-
- replicateModel(s); /* first, instantiate and initialize the model */
- myModel = s->descr; /* use newly instantiated model */
-
- makeobj((Object)myModel);
- backface(FALSE);
- fishWritemask(FOREGROUND);
- fishColor(myModel->color);
- rotate(900,'z');
- #define WIMP
- #ifdef WIMP
- rotate(900,'y');
- #endif /* WIMP */
- /*****
- rotate(900,'x');
- /*****/
- scale(-1.0, 1.0, -1.0);
- circi(10,0,12);
- circfi(7,4,2);
- backface(TRUE);
- closeobj();
- myModel->compiled = TRUE;
- myModel->component = (Object)myModel;
- }
-